import request from '@/utils/request'

// 创建预警日志
export function createMonitoringWarningLog(data) {
  return request({
    url: '/hardware/monitoring-warning-log/create',
    method: 'post',
    data: data
  })
}

// 更新预警日志
export function updateMonitoringWarningLog(data) {
  return request({
    url: '/hardware/monitoring-warning-log/update',
    method: 'put',
    data: data
  })
}

// 删除预警日志
export function deleteMonitoringWarningLog(id) {
  return request({
    url: '/hardware/monitoring-warning-log/delete?id=' + id,
    method: 'delete'
  })
}

// 获得预警日志
export function getMonitoringWarningLog(id) {
  return request({
    url: '/hardware/monitoring-warning-log/get?id=' + id,
    method: 'get'
  })
}

// 获得预警日志分页
export function getMonitoringWarningLogPage(query) {
  return request({
    url: '/hardware/monitoring-warning-log/page',
    method: 'get',
    params: query
  })
}

// 导出预警日志 Excel
export function exportMonitoringWarningLogExcel(query) {
  return request({
    url: '/hardware/monitoring-warning-log/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
